package com.pentofab.payrollmanagement.database;

import java.util.ArrayList;
import java.util.List;

import com.pentofab.payrollmanagement.dao.model.BankInfo;
import com.pentofab.payrollmanagement.dao.model.Company;
import com.pentofab.payrollmanagement.dao.model.Department;
import com.pentofab.payrollmanagement.dao.model.Designation;
import com.pentofab.payrollmanagement.dao.model.EmpCategory;
import com.pentofab.payrollmanagement.dao.model.Employee;
import com.pentofab.payrollmanagement.dao.model.Units;
import com.pentofab.payrollmanagement.exception.ExceptionMsg;

public interface EmployeeRepository extends ExceptionMsg {

	/**
	 * Gets the all employee info.
	 * 
	 * @return the all employee info
	 * @throws Exception
	 *             the exception
	 */
	public ArrayList<Employee> getAllEmployeeInfo() throws Exception;

	public Employee getEmpById(String empId) throws Exception;

	public ArrayList<Employee> getEmpByName(String companyCode, String empName,
			String operation) throws Exception;

	public void addEmploye(Employee employee,boolean updateNextEmpNo) throws Exception;

	public void updateEmployee(Employee employee) throws Exception;

	public void deleteEmployee(String employeeId, String userName) throws Exception;

	public ArrayList<Employee> getAllCompanyEmployees(String companyCode)
			throws Exception;
	public String getNextEmpId(String companyCode) throws Exception;

	/**
	 * Methods for RW of Department table
	 */

	public void addDepartment(Department department) throws Exception;

	public Department getDepartment(String companyCode, String code)
			throws Exception;

	public List<Department> getAllDepartments(String companyCode)
			throws Exception;

	public void deleteDepartment(String companyCode, String code)
			throws Exception;

	public void updateDepartment(Department department) throws Exception;;

	/**
	 * Methods for RW of Designation table
	 */

	public void addDesignation(Designation design) throws Exception;

	public Designation getDesignation(String companyCode, String code)
			throws Exception;

	public List<Designation> getAllDesignation(String companyCode)
			throws Exception;

	public void deleteDesignation(String companyCode, String code)
			throws Exception;

	public void updateDesignation(Designation design) throws Exception;

	/**
	 * Methods for RW of EmpCategory
	 */

	public void addEmpCategory(EmpCategory cateogry) throws Exception;

	public EmpCategory getEmpCategory(String companyCode, String code)
			throws Exception;

	public List<EmpCategory> getAllEmpCategory(String companyCode)
			throws Exception;

	public void deleteEmpCategory(String companyCode, String code)
			throws Exception;

	public void updateEmpCategory(EmpCategory empCategory) throws Exception;

	/**
	 * Methods for RW of Company table
	 */

	public void addCompany(Company company) throws Exception;

	public List<Company> getCompanies() throws Exception;

	public void updateCompany(Company company) throws Exception;

	public Company getCompany(String companyCode) throws Exception;
	
	
	/**
	 * Methods for RW of Units table
	 */
	public Units getUnit(String unitCode, String compCode) throws Exception;
	
	public void addUnit(Units units) throws Exception;

	public ArrayList<Units> getUnits(String companyCode) throws Exception;

	public void updateUnit(Units units) throws Exception;
	
	/**
	 * Methods for RW of BankInfo table
	 */
	
	public void addBank (BankInfo bankInfo) throws Exception;
	
	public ArrayList<BankInfo> getBankInfo(String bankCode) throws Exception;

	public void updateBankInfo(BankInfo bankInfo) throws Exception;
}
